{% extends 'base.html' %}
{% block title %}首页 - Page{% endblock title %}
{% block style %}
<style scoped>
</style>
{% endblock style %}

{% block content %}
<div class="container">
    <h3>{{ output }}</h3>
    xlsx File Name : {{ xlsxname }}
    <a href={{ url_for('output', path=xlsxname ) }}>
      <h2>✔️导出成功,点我下载汇总Excel表💖</h2>
    </a>
    <table class="table table-hover">
        <thead class="thead-dark">
          <tr>
            <th scope="col">学号</th>
            <th scope="col">姓名</th>
            <th scope="col">年级</th>
            <th scope="col">院系</th>
            <th scope="col">专业</th>
            <th scope="col">成绩</th>
          </tr>
        </thead>
        {% if datas %}
        <tbody>
          {% for item in datas %}
            <tr>
              <th scope="row">{{ item.no }}</th>
              <td>{{ item.name }}</td>
              <td>{{ item.grade }}</td>
              <td>{{ item.department }}</td>
              <td>{{ item.major }}</td>
              {% if item.scores %}
              <td>
                <table class="table table-striped">
                {% for item in item.scores %}
                <tr>
                  <td>{{ item.course }}</td>
                  <td>{{ item.score }}</td>
                </tr>
                {% endfor %}
              </table>
              </td>
              {% endif %}
            </tr>
          {% endfor %}
        </tbody>
        {% endif %}
      </table>
</div>

{% endblock content %}